package weborb.gcf.business
{
	import com.adobe.cairngorm.business.ServiceLocator;
	
	import mx.rpc.IResponder;
	import mx.rpc.remoting.RemoteObject;
	
	import weborb.gcf.vo.*;
	
	public class PlayerDelegate
	{
		private var responder : IResponder;
		private var service : Object;
		
		public function PlayerDelegate(responder : IResponder )
		{
			this.service = ServiceLocator.getInstance().getRemoteObject( "Player" );
			
			this.responder = responder;
		}
		
		
		public function login(login:String,password:String) : void
		{
			var ro:RemoteObject = RemoteObject(service);
			ro.setCredentials( login, password );
			var call : Object = ro.login();
			call.addResponder( responder );
		}
	}
}